<script>
	import {
		mapActions
	} from 'vuex'
	export default {
		onLaunch: function() {
			this.InitApp()
			console.log("App Launch");
		},
		onShow: function() {
			console.log("App Show");
		},
		onHide: function() {
			console.log("App Hide");
		},
		methods: {
			InitApp() {
				const isLogin = uni.getStorageSync('is_login')
				if (!isLogin === true) {
					//跳转进入登录页
					uni.reLaunch({
						url: "/pages/login/index",
						success: () => {}
					})
				} else {
					//跳转进入登录页
					uni.reLaunch({
						url: "/pages/index/home/index",
						success: () => {}
					})
				}
			}
		},
	};
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "@/uni_modules/uview-ui/index.scss";
	@import "@/uni_modules/uni-scss/index.scss";
</style>